Method: RuboCop::Cop::Offense#<=>
- Defined in:
- lib/rubocop/cop/offense.rb
permalink #<=>(other) ⇒ Integer
Returns ‘-1`, `0`, or `+1` if this offense is less than, equal to, or greater than `other`.
229 230 231 232 233 234 235 |
# File 'lib/rubocop/cop/offense.rb', line 229 def <=>(other) COMPARISON_ATTRIBUTES.each do |attribute| result = public_send(attribute) <=> other.public_send(attribute) return result unless result.zero? end 0 end |